<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
  <script>
    var x;
    var y;
    var z;
    for(x=0;x<=25;x++){
      y=25-x;
      z=31-y;
      if(28==x+z){
        document.writeln('红色的球有'+x+'个'+'白色的球有'+y+'个'+'黑色的球有'+z+'个');
      }
    }
  </script>
</head>
<body>

</body>
</html>
